<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 500px;
            height: 500px;
            background-color: purple;
            /*设置背景图片*/
            background-image: url("3.png");
            /*设置背景图片尺寸*/
            background-size: 100px 100px ;
            /*设置禁止重复*/
            background-repeat: no-repeat;
            /*设置背景图片位置*/
            background-position:100px 300px;
        }
    </style>
</head>
<body>
<div></div>
<h1 style="color:red">颜色测试1</h1>
<h1 style="color:#ff0000">颜色测试2</h1>
<h1 style="color:#f00">颜色测试3</h1>
<h1 style="color:rgb(255,0,0)">颜色测试4</h1>
<h1 style="color:rgba(255,0,0,0.5)">颜色测试5</h1>

</body>
</html>